<include file="Public:header" />
<!--主体内容-->
<!--左边-->
<div class="centent_box">
    <include file="Public:left" />
    <!--右边-->
    <div class="centent_right_box">
        <div class="centent_right rightCon">
            <div class="Mtitle">
                <ul>
                    <li><span><a href="{:U('Ask/index')}">提问列表</a></span></span></li>
                    <li class="on"><span><a href="{:U('Ask/edit',array('id'=>$info['id']))}">编辑问题</a></span></li>
                </ul>
                <div class="rightWord"><a href="{:U('Ask/index')}">提问列表</a> &gt;&gt; 编辑问题</div>
            </div>
            <form id="info_form" action="{:U('Ask/edit')}" method="post" enctype="multipart/form-data">
            <input type="hidden" name="id" value="{$info.id}">
            <div class="con_div">
                <ul class="formList width2 list_ul">
                    <li>
                        <label>问题名称：</label>
                        <input type="text"  name="title" value="{$info.title}" class="inputStyle width3">
                    </li>
                    <li>
                        <label>所属分类：</label>
                        <select name="cate_id" class="selectStyle">
                            <volist name="cate_list" id='vo'>
                                <option <php>if($vo['id']==$info['cate_id']){</php> selected="selected" <php>}</php> value="{$vo.id}">{$vo.html}{$vo.name}</option>
                            </volist>
                        </select>
                    </li>
                    <li class="height3"><label>问题描述：</label><textarea class="textarea" name="info">{$info.info}</textarea></li>
                    <li>
                        <label></label>
                        <input type="submit" value="提 交" class="btnStyle">
                    </li>
                </ul>
            </div>
            </form>
        </div>
    </div>
</div>
<script src="__S__/js/jquery.validate.js"></script>
<script type="text/javascript">
    $(function(){
        $("#info_form").validate({
            rules: {
                title: {
                    required: true,
                    minlength: 2
                },
                info: {
                    required: true,
                    minlength: 5
                }
            },
            messages: {
                title: {
                    required: "请输入问题名称",
                    minlength: "问题名称一定要两个字以上"
                },
                info: {
                    required: "问题描述不能为空",
                    minlength: "问题描述一定要5个字以上"
                }
            }
        });
    });
</script>
<include file="Public:footer" />